<?php
$GLOBALS['NREQUEST']=array();

class NRequest {


function getVar($name,$hash='_REQUEST'){
	
	switch($hash){
	
	case'_GET': if (isset($_GET[$name])) {$_return=&$_GET[$name]; break;}
	case'_POST': if (isset($_POST[$name])) {$_return=&$_POST[$name]; break;}
	case'_REQUEST':
	default:
	if (isset($GLOBALS['NREQUEST']['SET.'.$name])){ $_return=$GLOBALS['NREQUEST']['SET.'.$name]; break;}
	if (isset($_REQUEST[$name]))
	 $_return=&$_REQUEST[$name];
	}
	
	if (!isset($_return)) {
	$_return="";
	 }
	return $_return;

}
function setVar($name,$value,$hash='_REQUEST'){

	 $GLOBALS['NREQUEST']['SET.'.$name]=$value;
}
function unsetVar($name){
	unset($GLOBALS['NREQUEST']['SET.'.$name]);
}
}
?>